package com.yanqu.road.entity.activity.pawnshop;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.config.system.NormalWeightItem;

import java.util.ArrayList;
import java.util.List;

/**
 * 当铺员工配置
 * 
 * @author sjh
 *
 */
@FieldTypeAnnotation(tableName = "t_s_activity_pawnshop_staff")
public class ConfPawnshopStaff {

	@FieldTypeAnnotation(select = true, update = true, desc = "活动ID")
	private int activityId;

	@FieldTypeAnnotation(update = true, desc = "员工ID")
	private int id;

	@FieldTypeAnnotation(desc = "类型")
	private int type;

	@FieldTypeAnnotation(desc = "等级")
	private int level;

	@FieldTypeAnnotation(desc = "名称")
	private String name;

	@FieldTypeAnnotation(desc = "解锁当铺等级")
	private int unlockLevel;

	@FieldTypeAnnotation(desc = "参数1")
	private int param1;

	@FieldTypeAnnotation(desc = "参数2")
	private int param2;

	@FieldTypeAnnotation(desc = "权重参数")
	private String paramWeight;

	private List<NormalWeightItem> weightItemList = new ArrayList<>();

	// ========================================================================
	public int getActivityId() {
		return activityId;
	}

	public void setActivityId(int activityId) {
		this.activityId = activityId;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getUnlockLevel() {
		return unlockLevel;
	}

	public void setUnlockLevel(int unlockLevel) {
		this.unlockLevel = unlockLevel;
	}

	public int getParam1() {
		return param1;
	}

	public void setParam1(int param1) {
		this.param1 = param1;
	}

	public int getParam2() {
		return param2;
	}

	public void setParam2(int param2) {
		this.param2 = param2;
	}

	public String getParamWeight() {
		return paramWeight;
	}

	public void setParamWeight(String paramWeight) {
		this.paramWeight = paramWeight;
		setWeightItemList(paramWeight);
	}

	private void setWeightItemList(String paramWeight) {
		List<NormalWeightItem> dataList = NormalWeightItem.parseWeightItemList(paramWeight);
		setWeightItemList(dataList);
	}

	public List<NormalWeightItem> getWeightItemList() {
		return weightItemList;
	}

	public void setWeightItemList(List<NormalWeightItem> weightItemList) {
		this.weightItemList = weightItemList;
	}
}
